/*****************************************************************
 *@Copyright all rights reserved ? 2014 Yuga
 *@author YUga studio
 *Contact: zengkang007@gmail.com
 *****************************************************************/
package com.oplink.webbase.modules.invoicing.entity;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.oplink.webbase.common.persistence.DataEntity;
import com.oplink.webbase.modules.sys.entity.User;
/**
 * 告警Entity
 * @author YUga studio
 * @version 2015-01-12
 */
@Entity
@Table(name = "invoicing_order_detail")
@DynamicInsert
@DynamicUpdate
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class OrderDetail extends DataEntity {
	
	private static final long serialVersionUID = 1L;
	private User user;
	private int sort; // ����
	private Integer orderId; // 销售单编号
	private String orderName; // 参考商品资料
	private Integer goodsId; // 销售人员编号
	private Integer goodsAmount; // 订货量
	private String goodsUnit; // 计量单位
	private String goodsSpec; // 商品规格
	private Integer goodsPrice; // 商品价格
	private Integer orderOwner; // 下单人
	private String orderDate; // 订单时间
	private String remark; // 备注

    
	  public Integer getOrderId() {
        return orderId;
      }
      
      public void setOrderId(Integer orderId) {
        this.orderId = orderId;
      }
    
	  public String getOrderName() {
        return orderName;
      }
      
      public void setOrderName(String orderName) {
        this.orderName = orderName;
      }
    
	  public Integer getGoodsId() {
        return goodsId;
      }
      
      public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
      }
    
	  public Integer getGoodsAmount() {
        return goodsAmount;
      }
      
      public void setGoodsAmount(Integer goodsAmount) {
        this.goodsAmount = goodsAmount;
      }
    
	  public String getGoodsUnit() {
        return goodsUnit;
      }
      
      public void setGoodsUnit(String goodsUnit) {
        this.goodsUnit = goodsUnit;
      }
    
	  public String getGoodsSpec() {
        return goodsSpec;
      }
      
      public void setGoodsSpec(String goodsSpec) {
        this.goodsSpec = goodsSpec;
      }
    
	  public Integer getGoodsPrice() {
        return goodsPrice;
      }
      
      public void setGoodsPrice(Integer goodsPrice) {
        this.goodsPrice = goodsPrice;
      }
    
	  public Integer getOrderOwner() {
        return orderOwner;
      }
      
      public void setOrderOwner(Integer orderOwner) {
        this.orderOwner = orderOwner;
      }
    
	  public String getOrderDate() {
        return orderDate;
      }
      
      public void setOrderDate(String orderDate) {
        this.orderDate = orderDate;
      }
    
	  public String getRemark() {
        return remark;
      }
      
      public void setRemark(String remark) {
        this.remark = remark;
      }
    
    
    // JPA ����USER_ID�еĶ��һ��ϵ����
	@ManyToOne
	@JoinColumn(name = "user_id")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	} 
	
	@Transient
	public int getSort() {
		return sort;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}
}
